<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>padding处理宽度变宽问题</title>
    <style type="text/css">
        html,
        body {
            display: flex;
            flex-direction: column;
            flex: 1;
            width: 100%;
            height: 100%;
        }

        .container {
            display: flex;
            flex-direction: column;
            flex: 1;
            width: 100%;
            height: 100%;
            background-color: red;
        }

        .content {
            display: flex;
            flex-direction: column;
        }

        /* 通过css3新属性处理 padding宽度问题 */
        .padding-class-width {
            /* width: 100%; */
            height: 80px;
            padding-left: 300px;
            background-color: blue;
            box-sizing: border-box;
            /* 方式2 使用css 计算方式 */
            
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="content">
            <div class="padding-class-width"></div>
        </div>
    </div>
</body>

</html>